<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>污染档案管理</title>
	<meta name="decorator" content="default"/>
	<%@include file="/WEB-INF/views/include/treetable.jsp" %>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#treeTable").treeTable({expandLevel : 3});
		});
    	function updateSort() {
			loading('正在提交，请稍等...');
	    	$("#listForm").attr("action", "${ctx}/enviroment/case/updateSort");
	    	$("#listForm").submit();
    	}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/enviroment/case/">污染档案列表</a></li>
		<li><a href="${ctx}/enviroment/case/form">污染档案添加</a></li>
	</ul>
	<sys:message content="${message}"/>
	<form id="listForm" method="post">
		<table id="treeTable" class="table table-striped table-bordered table-condensed">
			<tr><th >污染档案编号</th><th>水年消耗量</th><th>电年消耗量</th><th>燃料年消耗量</th>
				<th >排放污染物种类</th><th >主要生产工艺及产污节点</th><th >治污防治设施名称处理工艺及能力</th><th >操作</th></tr>
			<c:forEach items="${list}" var="tpl">
				<tr id="${tpl.id}" pId="0">
					<td><a href="${ctx}/enviroment/case/form?id=${tpl.id}">${tpl.name}</a></td>
					<td>${tpl.energyAndYU.get("water")}</td>
					<td>${tpl.energyAndYU.get("electricity")}</td>
					<td>${tpl.energyAndYU.get("fuel")}</td>
					<td style="text-align:center;">
							${tpl.pollutionCategory}
					</td>
					<td>${tpl.processAndNode}</td>
					<td>${tpl.technologyAndFacilities}</td>
					<td>
						<%--<a href="${pageContext.request.contextPath}${fns:getFrontPath()}/list-${tpl.id}${fns:getUrlSuffix()}" target="_blank">详情</a>--%>
						<a href="${ctx}/enviroment/case/form?id=${tpl.id}">详情</a>
						<a href="${ctx}/enviroment/case/form?id=${tpl.id}">修改</a>
						<a href="${ctx}/enviroment/case/delete?id=${tpl.id}" onclick="return confirmx('要删除该污染档案项吗？', this.href)">删除</a>
					</td>
				</tr>
			</c:forEach>
		</table>
	</form>
</body>
</html>